<?php

use Illuminate\Database\Seeder;
use App\MenuPermission;
use App\Route;
use App\BaseDictionary;
use App\Services\MenuPermissionService;
use App\Services\RouteService;

class CreateOperationModuleSeeder extends Seeder
{
    private $menuPermissionService = null;
    private $routeService = null;
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $this->menuPermissionService = new MenuPermissionService();
        $this->routeService = new RouteService();

        $operationModule = $this->menuPermissionService->createMenuPermission([
            'name' => '业务运营',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_TOP_NAVI,
            'parent_id' => null,
            'sort_order' => 1,
        ]);

        $this->createActivityGroupManagements($operationModule);
        $this->createActivityOperations($operationModule);
        $this->createActivityNews($operationModule);
    }

    private function createActivityNews($operationModule){
        $newsManagement = $this->menuPermissionService->createMenuPermission([
            'name' => '新闻管理',
            'icon' => '&#xe612;',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU_GROUP,
            'parent_id' => $operationModule->id,
            'sort_order' => 0,
        ]);

        $newsIndex = $this->menuPermissionService->createMenuPermission([
            'name' => '新闻管理页面',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '新闻管理',
                'code' => 'news_index',
                'route' => '/operations/news/index',
                'action' => 'Activity\NewsController@index',
                'slug' => 'operations.news.index',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $newsManagement->id,
            'sort_order' => 1,
        ]);

        $newsQuery = $this->menuPermissionService->createMenuPermission([
            'name' => '查询新闻页面',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '新闻查询路由',
                'code' => 'news_query',
                'route' => '/backstage/api/news/query',
                'action' => 'Activity\NewsController@getNews',
                'slug' => 'operations.news.query',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 2,
            ])->id,
            'parent_id' => $newsIndex->id,
            'sort_order' => 1,
        ]);

        $newsCreate = $this->menuPermissionService->createMenuPermission([
            'name' => '新增新闻',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '新增新闻',
                'code' => 'news_create',
                'route' => '/operations/news/create',
                'action' => 'Activity\NewsController@create',
                'slug' => 'operations.news.create',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 2,
            ])->id,
            'parent_id' => $newsIndex->id,
            'sort_order' => 2,
        ]);

        $newsCreateSave = $this->menuPermissionService->createMenuPermission([
            'name' => '保存新增',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '新增新闻保存路由',
                'code' => 'news_save',
                'route' => '/backstage/api/savenews',
                'action' => 'Activity\NewsController@saveNews',
                'slug' => 'operations.news.save',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 3,
            ])->id,
            'parent_id' => $newsIndex->id,
            'sort_order' => 3,
        ]);

        $delNews = $this->menuPermissionService->createMenuPermission([
            'name' => '删除新闻',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '删除新闻',
                'code' => 'news_del',//code必须唯一，一定要确保
                'route' => '/backstage/api/news/delete',//只是示例，后面要改成实际的route
                'action' => 'Activity\NewsController@delNews',//只是示例，后面要改成实际的action
                'slug' => 'operations.news.del',//只是示例，后面要改成实际的slug
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 4,
            ])->id,
            'parent_id' =>$newsIndex->id,
            'sort_order' => 0,
        ]);

        $editNews = $this->menuPermissionService->createMenuPermission([
            'name' => '修改新闻',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '修改新闻',
                'code' => 'news_edit',//code必须唯一，一定要确保
                'route' => '/operations/news/edit/{newsId}',//只是示例，后面要改成实际的route
                'action' => 'Activity\NewsController@edit',//只是示例，后面要改成实际的action
                'slug' => 'operations.news.edit',//只是示例，后面要改成实际的slug
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 3,
            ])->id,
            'parent_id' => $newsIndex->id,
            'sort_order' => 0,
        ]);

        $editNewsSave = $this->menuPermissionService->createMenuPermission([
            'name' => '保存修改',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '修改新闻保存',
                'code' => 'news_save_update',
                'route' => '/backstage/api/news/update',
                'action' => 'Activity\NewsController@saveUpdateNews',
                'slug' => 'operations.news.saveupdate',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 4,
            ])->id,
            'parent_id' => $newsIndex->id,
            'sort_order' => 0,
        ]);
    }

    private function createActivityGroupManagements($operationModule)
    {
        $groupManagement = $this->menuPermissionService->createMenuPermission([
            'name' => '志愿者管理',
            'icon' => '&#xe612;',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU_GROUP,
            'parent_id' => $operationModule->id,
            'sort_order' => 0,
        ]);

        $partnerGroupSuccess = $this->menuPermissionService->createMenuPermission([
            'name' => '设置志愿者团队',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '设置志愿者团队路由',
                'code' => 'perm_volunteer_group_setting',
                'route' => '/backstage/volunteer-group-setting',
                'action' => 'Activity\TeamController@partnerSuccess',
                'slug' => 'group.volunteer.setting',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $groupManagement->id,
            'sort_order' => 1,
        ]);

        $volunteerQuery = $this->menuPermissionService->createMenuPermission([
            'name' => '查询志愿者团队',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '查询志愿者团队路由',
                'code' => 'perm_volunteer_group_settings_query',
                'route' => '/backstage/api/volunteer-group-setting/query',
                'action' => 'Activity\TeamController@getExternalPartnerSuccess',
                'slug' => 'group.volunteer.api.query',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 2,
            ])->id,
            'parent_id' => $partnerGroupSuccess->id,
            'sort_order' => 2,
        ]);

        $volunteerSuccess = $this->menuPermissionService->createMenuPermission([
            'name' => '保存设置志愿者团队',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '保存设置志愿者团队路由',
                'code' => 'perm_volunteer_group_setting_success',
                'route' => '/backstage/api/volunteer-group-setting/dosuccess',
                'action' => 'Activity\TeamController@partnerDoSuccess',
                'slug' => 'group.volunteer.setting.dosuccess',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 3,
            ])->id,
            'parent_id' => $partnerGroupSuccess->id,
            'sort_order' => 3,
        ]);
    }

    private function createActivityOperations($operationModule)
    {
        $activityOperation = $this->menuPermissionService->createMenuPermission([
            'name' => '志愿活动',
            'icon' => '&#xe612;',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU_GROUP,
            'parent_id' => $operationModule->id,
            'sort_order' => 0,
        ]);

        $createActivityRoute = $this->routeService->createRoute([
            'name' => '新建活动路由',
            'code' => 'perm_create_activity',
            'route' => '/activity/create_act',
            'action' => 'Activity\ActivityController@create',
            'slug' => 'route.activity.create_act',
            'route_type' => Route::$ROUTE_TYPE_WEB,
            'method' => Route::$ROUTE_METHOD_GET,
            'sort_order' => 1,
        ]);

        $createManage = $this->menuPermissionService->createMenuPermission([
            'name' => '新建活动',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $createActivityRoute->id,
            'parent_id' => $activityOperation->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $createSaveManage = $this->menuPermissionService->createMenuPermission([
            'name' => '保存新增',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '保存新增',
                'code' => 'perm_createsave_activity',
                'route' => '/backstage/api/activity/create_act_save',
                'action' => 'Activity\ActivityController@createSave',
                'slug' => 'route.operations.activity.create_act_save',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 2,
            ])->id,
            'parent_id' => $createManage->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $inactActivityManage = $this->menuPermissionService->createMenuPermission([
            'name' => '待审核活动',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '查看待审核活动主页面',
                'code' => 'perm_index_inact_activity',
                'route' => '/backstage/inact-activity',
                'action' => 'Activity\ActivityController@indexInActive',
                'slug' => 'route.inact.activity.index',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 0,
            ])->id,
            'parent_id' => $activityOperation->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $inactActivityQuery = $this->menuPermissionService->createMenuPermission([
            'name' => '待审核活动查询',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '待审核活动查询路由',
                'code' => 'perm_inact_activity_query',
                'route' => '/backstage/api/inact-activity/query',
                'action' => 'Activity\ActivityController@getInActiveActivities',
                'slug' => 'activity.inact.query',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $inactActivityManage->id,
            'sort_order' => 1,
        ]);

        $createManage = $this->menuPermissionService->createMenuPermission([
            'name' => '新建活动',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $createActivityRoute->id,
            'parent_id' => $inactActivityManage->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $toAuditActivity = $this->menuPermissionService->createMenuPermission([
            'name' => '提交活动审核',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '提交活动审核路由',
                'code' => 'perm_inact_activity_toaudit',
                'route' => '/backstage/api/inact-activity/toaudit',
                'action' => 'Activity\ActivityController@toAuditActivity',
                'slug' => 'activity.inact.toaudit',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $inactActivityManage->id,
            'sort_order' => 1,
        ]);

        $activityManage = $this->menuPermissionService->createMenuPermission([
            'name' => '已审核通过活动',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '查看已审核活动主页面',
                'code' => 'perm_index_activity',
                'route' => '/backstage/activity',
                'action' => 'Activity\ActivityController@index',
                'slug' => 'route.activity.index',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 0,
            ])->id,
            'parent_id' => $activityOperation->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $activityQuery = $this->menuPermissionService->createMenuPermission([
            'name' => '已审核活动查询',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '已审核活动查询路由',
                'code' => 'perm_act_activity_query',
                'route' => '/backstage/api/act-activity/query',
                'action' => 'Activity\ActivityController@getActiveActivities',
                'slug' => 'activity.act.query',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $activityManage->id,
            'sort_order' => 1,
        ]);

        $editManage = $this->menuPermissionService->createMenuPermission([
            'name' => '修改活动',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '修改活动',
                'code' => 'perm_edit_activity',//code必须唯一，一定要确保
                'route' => '/activity/edit',//只是示例，后面要改成实际的route
                'action' => 'Activity\ActivityController@edit',//只是示例，后面要改成实际的action
                'slug' => 'route.activity.edit',//只是示例，后面要改成实际的slug
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 3,
            ])->id,
            'parent_id' => $activityManage->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $delManage = $this->menuPermissionService->createMenuPermission([
            'name' => '删除活动',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '删除活动',
                'code' => 'perm_del_activity',//code必须唯一，一定要确保
                'route' => '/activity/del',//只是示例，后面要改成实际的route
                'action' => 'Activity\ActivityController@del',//只是示例，后面要改成实际的action
                'slug' => 'route.activity.del',//只是示例，后面要改成实际的slug
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 4,
            ])->id,
            'parent_id' => $activityManage->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $statusManage = $this->menuPermissionService->createMenuPermission([
            'name' => '活动审批',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '活动审批主页面',
                'code' => 'perm_audit_activity',
                'route' => '/activity/audit',
                'action' => 'Activity\ActivityController@indexAudit',
                'slug' => 'route.activity.audit',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 0,
            ])->id,
            'parent_id' => $activityOperation->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $statusManageQuery = $this->menuPermissionService->createMenuPermission([
            'name' => '待审批活动查询',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '待审批活动查询路由',
                'code' => 'perm_toaudit_activity_query',
                'route' => '/backstage/api/toaudit-activity/query',
                'action' => 'Activity\ActivityController@getAuditActivities',
                'slug' => 'activity.toaudit.query',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $statusManage->id,
            'sort_order' => 1,
        ]);

        $statusManageOpen = $this->menuPermissionService->createMenuPermission([
            'name' => '打开活动审批页面',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '活动审批页面路由',
                'code' => 'perm_toaudit_activity_toshow',
                'route' => '/backstage/api/toaudit-activity/toshow/{activityId}',
                'action' => 'Activity\ActivityController@toShowAuditActivity',
                'slug' => 'activity.toaudit.toshow',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $statusManage->id,
            'sort_order' => 1,
        ]);

        $statusManageTodo = $this->menuPermissionService->createMenuPermission([
            'name' => '通过审批',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '通过审批路由',
                'code' => 'perm_toaudit_activity_todo',
                'route' => '/backstage/api/toaudit-activity/todo',
                'action' => 'Activity\ActivityController@toDoAuditActivity',
                'slug' => 'activity.toaudit.todo',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $statusManage->id,
            'sort_order' => 1,
        ]);

        $seedManage = $this->menuPermissionService->createMenuPermission([
            'name' => '活动直播',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '活动直播主页面',
                'code' => 'perm_seed_activity',//code必须唯一，一定要确保
                'route' => '/activity/seed',//只是示例，后面要改成实际的route
                'action' => 'Activity\ActivityController@seed',//只是示例，后面要改成实际的action
                'slug' => 'route.activity.seed',//只是示例，后面要改成实际的slug
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 0,
            ])->id,
            'parent_id' => $activityOperation->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $activityApplyAudit = $this->menuPermissionService->createMenuPermission([
            'name' => '加入活动申请审批',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_MENU,
            'route_id' => $this->routeService->createRoute([
                'name' => '加入活动申请审批主页面',
                'code' => 'perm_activity_apply_audit',//code必须唯一，一定要确保
                'route' => '/activity/user_apply_audit',//只是示例，后面要改成实际的route
                'action' => 'Activity\ActivityController@applyActivityAudit',//只是示例，后面要改成实际的action
                'slug' => 'route.activity.audit_user_apply',//只是示例，后面要改成实际的slug
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_GET,
                'sort_order' => 0,
            ])->id,
            'parent_id' => $activityOperation->id,
            'is_default' => BaseDictionary::$KEY_NO,
            'sort_order' => 0,
        ]);

        $activityApplyAuditQuery = $this->menuPermissionService->createMenuPermission([
            'name' => '加入活动申请审批查询',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '加入活动申请审批查询路由',
                'code' => 'perm_activity_apply_audit_query',
                'route' => '/activity/api/user_apply_audit/query',
                'action' => 'Activity\ActivityController@getUserApplyActivityData',
                'slug' => 'route.activity.audit_user_apply.query',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $activityApplyAudit->id,
            'sort_order' => 1,
        ]);

        $activityApplyAuditIndex = $this->menuPermissionService->createMenuPermission([
            'name' => '加入活动申请审批页面',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '活动申请审批页面路由',
                'code' => 'perm_activity_apply_audit_index',
                'route' => '/activity/api/user_apply_audit/index',
                'action' => 'Activity\ActivityController@UserApplyIndex',
                'slug' => 'route.activity.audit_user_apply.index',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $activityApplyAudit->id,
            'sort_order' => 1,
        ]);

        $activityApplyAuditPass = $this->menuPermissionService->createMenuPermission([
            'name' => '通过活动申请审批',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '通过活动申请审批路由',
                'code' => 'perm_activity_apply_audit_pass',
                'route' => '/activity/api/user_apply_audit/pass',
                'action' => 'Activity\ActivityController@passUserApply',
                'slug' => 'route.activity.audit_user_apply.pass',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $activityApplyAudit->id,
            'sort_order' => 1,
        ]);

        $activityApplyAuditDeny = $this->menuPermissionService->createMenuPermission([
            'name' => '拒绝活动申请审批',
            'permission_type' => MenuPermission::$PERMISSION_TYPE_OPERATION,
            'route_id' => $this->routeService->createRoute([
                'name' => '拒绝活动申请审批路由',
                'code' => 'perm_activity_apply_audit_deny',
                'route' => '/activity/api/user_apply_audit/deny',
                'action' => 'Activity\ActivityController@denyUserApply',
                'slug' => 'route.activity.audit_user_apply.deny',
                'route_type' => Route::$ROUTE_TYPE_WEB,
                'method' => Route::$ROUTE_METHOD_POST,
                'sort_order' => 1,
            ])->id,
            'parent_id' => $activityApplyAudit->id,
            'sort_order' => 1,
        ]);
    }
}
